﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="editNews.aspx.cs" Inherits="admin_newsList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
    .style1
    {
        width: 100%;
    }
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><div class="Body_Title">
    系统信息管理 》》新闻一览</div>
<table class="style1">
    <tr>
        <td>
            类型</td>
        <td>
            <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                DataSourceID="SqlDataSourceNewsClass" DataTextField="c_Name" 
                DataValueField="cID">
            </asp:DropDownList>
            <asp:SqlDataSource ID="SqlDataSourceNewsClass" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                SelectCommand="SELECT cID, c_parentID, c_Name FROM classInfo WHERE (c_parentID = 4)">
            </asp:SqlDataSource>
        </td>
    </tr>
    </table> <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                AutoGenerateColumns="False" DataSourceID="SqlDataSourceNews" 
                EnableModelValidation="True">
                <Columns>
                    <asp:BoundField DataField="xwID" HeaderText="编号" SortExpression="xwID" />
                    <asp:HyperLinkField DataNavigateUrlFields="xwID" 
                        DataNavigateUrlFormatString="addNews.aspx?ID={0}" DataTextField="xwName" 
                        HeaderText="标题" />
                    <asp:BoundField DataField="u_Name" HeaderText="作者" 
                        SortExpression="u_Name" />
                    <asp:BoundField DataField="xwTime" HeaderText="发布时间" 
                        SortExpression="xwTime" />
                </Columns>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSourceNews" runat="server" 
                ConnectionString="<%$ ConnectionStrings:LabInfoManageSystemConnectionString %>" 
                
        SelectCommand="SELECT xwgg.xwID, xwgg.xwName, userInfo.u_Name, xwgg.xwTime, xwgg.xwClass, xwgg.xwContent FROM userInfo INNER JOIN xwgg ON userInfo.zID = xwgg.xwAuthor WHERE (xwgg.xwClass = @xwClass)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="DropDownList1" Name="xwClass" 
                        PropertyName="SelectedValue" Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
</asp:Content>

